# include <stdio.h>

void show_memory(void *start, int memory_len) {
    char *p = (char*)start;
    for (int i = 0; i < memory_len; ++i) {
        // 按照内存查询的格式输出
        if(i % 4 == 0) {
            printf("0x%p ", p+i);  // 地址
        }
        // 内存的数据
//        printf("%x ", p[i]);
        printf("%x", (p[i] & 0x000000f0) >> 4);
        printf("%x ", (p[i] & 0x0000000f));
        if ((i + 1) % 4 == 0) {
            printf("\n");
        }
    }
}


int main() {

    float f = 1.456;
    show_memory(&f, sizeof (f));

    int arr[] = {1,2,3};
    show_memory(&arr, sizeof (arr));

    return 0;
}